<?php 
$this->headLink(array('href' => '/cms/styles/style.css', 'rel' => "stylesheet", 'type' => "text/css"));

//$this->headScript(Zend_View_Helper_HeadScript::FILE,'/cms/scripts/dojo/dojo.js');


$this->layout()->body_attr = 'class="modal"';
?>
<form action="" method="post" enctype="multipart/form-data">
  <div class="stnd_font" style="margin-bottom:6px"><!-- img src="cms/images/image_plus.png" width="16" height="16" align="baseline" /> <a href="javascript:chooseFile()">Загрузить</a -->
    <input type="file" name="im_file" id="im_file" onchange="this.form.submit()" style="width:200px" />
    <input type="hidden" name="upload_new" value="1" />
  </div>
</form>
<form id="form1" name="form1" method="post" action="">
<input type="hidden" name="uploaded_file" value="<?=$this->temp_name?>" />
  <div style="width:200px; height:200px; border: dashed 1px #000000;">
    <table width="200" height="200" border="0" cellspacing="0" cellpadding="00">
      <tr>
        <td align="center" valign="middle" class="stnd_font">
<?php 
switch ($this->image_mode) {
	case 'cover_image':
		echo '<img src="/cms/cover/thumb/id/'.$this->cover->cover_id.'/dummy.'.$this->cover->file->extention.'" />';
		break;
	case 'temp_image':	
		echo '<img src="/cms/cover/temp/file/'.$this->temp_name.'" />';
		break;
	default:
		echo 'Нет изображения';
	break;
}

?>
        
        </td>
      </tr>
    </table>
  </div>
  <div style="text-align:center;padding:6px">
    <input type="submit" class="okButton" value="Сохранить" />
    <input type="button" class="okButton" value="Отмена" onclick="window.parent.setTimeout('Shadowbox.close()',10)" />
  </div>
</form>